<?
require("config.php");

$langname = "hme";
require("header.php");

?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="186" valign="top">
      <?require("nav.php")?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td valign="top">
      <?require("menu.php")?>
      <?

$table = "med_news";

$field = array(

"id",
"date",
"subject",
"details",
"picture1",

);

$exp = "order by order_index Limit 1";

$r = limitQuery($table,$field,$exp);

?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><img src="images/news.gif"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><strong>
            <?=$r[0][2]?>
            </strong> (
            <?=$r[0][1]?>
            )</td>
        </tr>
        <tr>
          <td><br>
            <a href="javascript:void(null)" onCLick="newWin('zoom.php?pic=<?=urlencode($PIC_DIR . "$table/" . $r[0][4])?>',770,500);">
            <?=showPic($PIC_DIR . "$table/sm_" . $r[0][4],"left")?>
            </a>
            <?=substr($r[0][3],0,600)?>
          </td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>
            <div align="right"><a href="news.php?id=<?=$r[0][0]?>">
              <?=$lang['details']?>
              </a> | <a href="javascript:Redirect('email.php?id=<?=$r[0][0]?>&p=news',3)"><u>e-mail to friend</u></a></div>
          </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><img src="images/head04.gif"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
    <?

$table = "med_events";

$field = array(

"id",
"date",
"subject",
"details",
"picture1",

);

$exp = "order by order_index Limit 1";

$r = limitQuery($table,$field,$exp);

?>



      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">

        <tr> 
          <td><strong><?=$r[0][2]?></strong> (<?=$r[0][1]?>)</td>
        </tr>
        <tr> 
          <td>
		  <br>
		  		  <a href="javascript:void(null)" onCLick="newWin('zoom.php?pic=<?=urlencode($PIC_DIR . "$table/" . $r[0][4])?>',770,500);"><?=showPic($PIC_DIR . "$table/sm_" . $r[0][4],"left")?> </a> 
		  
		  <?=substr($r[0][3],0,600)?> ...
</td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><div align="right"> <a href="events.php"><?=$lang['details']?></a> | 
              <a href="email.php?id=<?=$r[0][0]?>&p=events" target="_blank">e-mail to friend</a></div>
		  
		  </td>
        </tr>
      </table>
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><img src="images/head05.gif"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <?



$table = "course_schedule";

$field = array(

"id",
"date",
"name",
"course",
);

$exp = '';

$exp .= " and showcase='1' ORDER by order_index";

$t = unlimitQuery($table,$field,$exp);

for ($g=0;$g<count($t);$g++) {

$date = $t[$g][1];
$name = $t[$g][2];
$id=$t[$g][0];
$ccourse = $t[$g][3];
$schedule_id=$id;



$table = "course_sharing";

$field = array(

"id",
"graduate",
"detail",
	"picture1",
	"picture2",
	"picture3",
);

$exp = "AND ccode = '$id' AND status = 'Yes' and showcase='1' ORDER by order_index";

$r = unlimitQuery($table,$field,$exp);
if (!empty($r[0][0])) { 

?>
      <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td colspan="2"><b>
            <?=$name?>
            </b> </td>
        </tr>
        <tr>
          <td colspan="2">
            <?=outDate($date)?>
          </td>
        </tr>
        <tr>
          <td valign="top">
            <table>
              <? for ($i=0;$i<count($r);$i++){ ?>
              <tr>
                <td valign="top"><a href="<?=$PIC_DIR . "$table/" . $r[$i][3]?>" target="_blank">
                  <?=showPic($PIC_DIR . "$table/" . $r[$i][3],"")?>
                  </a><br>
                  <a href="<?=$PIC_DIR . "$table/" . $r[$i][4]?>" target="_blank">
                  <?=showPic($PIC_DIR . "$table/" . $r[$i][4],"")?>
                  </a><br>
                  <a href="<?=$PIC_DIR . "$table/" . $r[$i][5]?>" target="_blank">
                  <?=showPic($PIC_DIR . "$table/" . $r[$i][5],"")?>
                  </a> </td>
                <td valign="top">
                  <p> <u>
                    <?=$r[$i][1]?>
                    </u><br>
                    <?=$r[$i][2]?>
                  </p>
                </td>
              </tr>
              <? }  ?>
            </table>
          </td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td>
            <div align="right"> <div align="right"><a href="sharinglist.php">read more</a> | <a href="javascript:Redirect('email.php?id=<?=$t[$g][0]?>&p=graduate_sharing',3)"><u>e-mail to friend</u></a></div></div>
          </td>
        </tr>
      </table>
      <?php } } ?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td width="173" valign="top">
      <?require("list.php")?>
    </td>
  </tr>
</table>
<?require("footer.php")?>
